package com.sbtr.business.feature.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;


/**
 * 特征算子字段列表 实体类
 *
 * @author dgl
 * @since 2023-04-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("f_fe_operator")
@ApiModel(value="FeOperator对象")
public class FeOperator extends Model<FeOperator> {

    @ApiModelProperty(value = "id")
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty(value = "算子名称,功能名称，来自菜单栏表")
    private String operatorname;

    @ApiModelProperty(value = "菜单表ID，或配置文件等，目的是保持算子唯一性")
    private Long menuId;

    @ApiModelProperty(value = "根节点为root，文件上传算子为root")
    private Long pid;

    @ApiModelProperty(value = "算子类型")
    private String operatorType;

    @ApiModelProperty(value = "当前节点坐标,JSON格式")
    private String coordinate;

    @ApiModelProperty(value = "所属画布fe_canvas 表ID，外键")
    private Long canvasId;

    @ApiModelProperty(value = "所属项目iteminfo 表ID，外键，非必须包含")
    private Long iteminfoId;

    @ApiModelProperty(value = "所属项目名称,冗余存储，来自iteminfo表")
    private String itemname;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")// 后台传数据到前台
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //前台传数据到后台
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
